package com.am.server.amcore;

import java.util.ArrayList;
import java.util.List;

import com.am.cell.ICell;
import com.am.output.IAMOutput;

public class AMJsonOutput implements IAMOutput {

    private List<String> ot = new ArrayList<String>();
    private List<String> learned = new ArrayList<String>();
    
    @Override
    public void msg(String s) {
	ot.add(s);
    }
    
    public List<String> getAllOutputs(){
	List<String> ret = new ArrayList<String>();
	ret.addAll(ot);
	ret.addAll(learned);
	return ret;
    }

    @Override
    public void sendOutput(ICell cell) {
	learned.add("Cell Learned:" + cell.getValue().getValue());
    }

    @Override
    public void clear() {
	ot.clear();
	learned.clear();
    }

}
